import 'package:flutter/widgets.dart';
import 'package:yuan_hang_app/utils/size_utils.dart';

import '../../../res/w_colors.dart';
import '../../../widget/w_text.dart';

class EmptyWidget extends StatelessWidget {
  final VoidCallback? onTap;

  const EmptyWidget({super.key ,this.onTap});


  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Container(
        alignment: Alignment.center,
        child: GestureDetector(
          onTap:onTap,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              Image.asset(
                'images/no_data.png',
                width: 150.px,
              ),
              Padding(
                padding: EdgeInsets.only(top: 10.px),
                child: WText(
                  '暂无数据，点击刷新',
                  style: TextStyle(
                      fontSize: 14.px, color: WColors.subTextColor),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }

}